package com.hooya.fa.eu.biz.dao.wrapper;

import com.hooya.fa.eu.biz.dao.entity.TempXsjlAbnormal;
import com.hooya.integrated.common.mybatis.config.AbstractLambdaQueryWrapperProcess;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.StringUtils;
import org.springframework.util.CollectionUtils;

import java.util.List;

/**
 * @Description
 * @Author : Zongz
 * @Copyright Copyright (c) 豪雅集团
 * @Create 2024/10/21
 * @Version 1.0.0
 */
@Data(staticConstructor = "newQuery")
@EqualsAndHashCode(callSuper = true)
public class TempXsjlAbnormalWrapper extends AbstractLambdaQueryWrapperProcess<TempXsjlAbnormal> {

    public TempXsjlAbnormalWrapper eqPlace(String place) {
        return (TempXsjlAbnormalWrapper) this.eq(StringUtils.isNotBlank(place), TempXsjlAbnormal::getChck, place);
    }

    public TempXsjlAbnormalWrapper eqBelongs(String belongs) {
        return (TempXsjlAbnormalWrapper) this.eq(StringUtils.isNotBlank(belongs), TempXsjlAbnormal::getBelongs, belongs);
    }

    public TempXsjlAbnormalWrapper geOrderDate(String date) {
        return (TempXsjlAbnormalWrapper) this.ge(StringUtils.isNotBlank(date), TempXsjlAbnormal::getOrderDate, date);
    }

    public TempXsjlAbnormalWrapper inSku(List<String> skuList) {
        return (TempXsjlAbnormalWrapper) this.in(!CollectionUtils.isEmpty(skuList), TempXsjlAbnormal::getCpbh, skuList);
    }
}
